Get information about the API
After initialising the API in either offline or online mode (see this page), you can run any of the below commands to get information about the API.
This returns the signer object of the current connected account.
All API utils also work in offline mode.
- Gateway
- Version
- Options
- All
avnSdk.gateway;
(async () => {
await avnSdk.init();
console.log(avnSdk.gateway);
})();
Example Result
https://gateway.testnet.aventus.network/
avnSdk.options;
(async () => {
await avnSdk.init();
console.log(avnSdk.version);
})();
Example Result
3.0.0
avnSdk.options;
(async () => {
await avnSdk.init();
console.log(avnSdk.options);
})();
Example Result
{
setupMode: 0,
signingMode: 0,
defaultLogLevel: 'info',
nonceCacheOptions: { nonceCacheType: 0 }
}
avnSdk;
(async () => {
await avnSdk.init();
console.log(avnSdk);
})();
Example Result
AvnApi {
options: {
setupMode: 0,
signingMode: 0,
defaultLogLevel: 'info',
nonceCacheOptions: { nonceCacheType: 0 }
},
version: '3.0.0',
gateway: '<https://gateway.testnet.aventus.network/>',
accountUtils: [class AccountUtils],
awtUtils: [class AwtUtils],
proxyUtils: [class ProxyUtils],
signer: {
sign: [Function: sign],
address: 'your address'
},
myAddress: 'your address',
myPublicKey: 'your public key',
apis: [Function (anonymous)]
}